from django.conf.urls.defaults import *
from core import views
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^kahramanweb/', include('kahramanweb.foo.urls')),
    (r'^$', views.index),
    (r'^login/$', views.login),
    (r'^do_login/$', views.do_login),
    (r'^logout/$', views.do_logout),
    (r'^code/new/$', views.new_code),
    (r'^code/all/$', views.show_codes),
    (r'^category/all/$', views.show_categories),
    (r'^code/show/(?P<code_id>\d+)/$', views.show_code),
    (r'^code/edit/(?P<code_id>\d+)/$', views.edit_code),
    (r'^code/delete/(?P<code_id>\d+)/$', views.delete_code),
    (r'^category/show/(?P<category_id>\d+)/$', views.show_category),
    (r'^category/edit/(?P<category_id>\d+)/$', views.edit_category),
    (r'^category/delete/(?P<category_id>\d+)/$', views.delete_category),    
    (r'^category/new/$', views.new_category),
    (r'^/accounts/login/$', views.login),
    (r'^/accounts/logout/$', views.do_logout), 
    (r'^register/$', views.register), 
       

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # (r'^admin/(.*)', admin.site.root),
)
